package com.bite.forum.services;

import com.bite.forum.model.Article;
import com.bite.forum.model.Collect;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IArticleService {
    @Transactional
    void create (Article article);

    List<Article> selectAll ();

    List<Article> selectAllByBoardId(Long boardId);

    Article selectDetailById (Long id);

    Article selectById (Long id);

    List<Article> selectByUserId (Long userId);

    void modify (Long id, String title, String content);

    void thumbsUpById (Long id);

    //收藏
    Collect collectArticle(Long id, Long userId);
    //查看收藏
    Collect finlCollect(Long id, Long userId);

    List<Article> getFavoritesByUserId(Long id);

    @Transactional
    void deleteById (Long id);

    void addOneReplyCountById (Long id);
}
